package com.lichhao.system.model;

import java.util.Date;

import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import com.lichhao.common.model.BaseBean;

@SuppressWarnings("serial")
@Document(collection = "omArea")
public class OmAreaBean extends BaseBean {

	@Indexed(unique = true)
	private Integer areaId; // 区域标识

	private String areaName; // 区域名称

	private String areaCode; // 区域编码

	private Integer parntAreaId; // 上级区域

	private String areaDesc; // 区域描述

	private Date createDate; // 创建时间（用于测试mongodb对时间的支持）

	public OmAreaBean() {
		super();
		this.areaId = null;
		this.areaName = null;
		this.areaCode = null;
		this.parntAreaId = null;
		this.areaDesc = null;
		this.createDate = null;
	}

	public Integer getAreaId() {
		return areaId;
	}

	public void setAreaId(Integer areaId) {
		this.areaId = areaId;
	}

	public String getAreaName() {
		return areaName;
	}

	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}

	public String getAreaCode() {
		return areaCode;
	}

	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}

	public Integer getParntAreaId() {
		return parntAreaId;
	}

	public void setParntAreaId(Integer parntAreaId) {
		this.parntAreaId = parntAreaId;
	}

	public String getAreaDesc() {
		return areaDesc;
	}

	public void setAreaDesc(String areaDesc) {
		this.areaDesc = areaDesc;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	
	@Override
	public String getKeyName() {
		return "areaId";
	}

	@Override
	public Object getKeyValue() {
		return this.areaId;
	}

	@Override
	public void setKeyValue(Object key) {
		this.areaId = (Integer) key;
	}

}
